<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>四大天王</title>
    <style>
        ul{
            list-style: none;
        }
        ul::after{
            content: '';
            clear: both;
            display:block;
        }
        li{
            float:left;
            width: 80px;
        }
        #result{
            width: 200px;
            height: 200px;
            border:solid 1px #ddd;
        }
    </style>
</head>
<body>
    <ul>
        <li><img width="100%" src="./images/guofucheng.jpg" alt=""></li>
        <li><img width="100%" src="./images/liudehua.jpg" alt=""></li>
        <li><img width="100%" src="./images/liming.jpg" alt=""></li>
        <li><img width="100%" src="./images/zhangxueyou.jpg" alt=""></li>
    </ul>
    <div id="result"></div>
    <script>
        //潜规则, 在 JS 代码中可以直接使用与 id 同名的 变量
        setInterval(() => {
            result.innerHTML = (
                    `当前布局视口的宽度: ${document.documentElement.clientWidth}<br>
                    当前视觉视口的宽度: ${window.visualViewport.width}
                `)
        }, 100)
    </script>
</body>
</html>